{{assign var="title" value="菜单列表"}}
{{include file="admin/ptop.html"}}
<script type="text/javascript">
var closeListerner = function(){ window.location.reload(); }
function add(){
    showDialog("admin.php?ctl=sysmenu&act=add",420,280,"添加菜单", true, closeListerner);
}
function edit(id){
    showDialog("admin.php?ctl=sysmenu&act=edit&id="+id,420,280,"修改菜单", false, closeListerner);
}
</script>
<div class="toolsBar">
     <input type="button" value="添加菜单" onclick="add()" class="button_style">
</div>
<table width="100%" border="0" cellspacing="1" cellpadding="0" class="table_list">
    <tr>
        <th>ID</th>
        <th>标题</th>
        <th>启用</th>
        <th>排序</th>
        <th>操作</th>
    </tr>
    {{foreach from=$topmenu item=item}}
    <tr>
        <td>{{$item.ID}}</td>
        <td class="lf">{{$item.TITLE}}</td>
        <td>{{if $item.STATE==1}}启用{{else}}禁用{{/if}}</td>
         <td>{{$item.ORDER_NUM}}</td>
        <td> 
           <a id="GridView1_ctl02_hlkEdit" href="javascript:edit({{$item.ID}})">修改</a> | <a id="GridView1_ctl02_hlkDel" href="admin.php?ctl=sysmenu&act=del&id={{$item.ID}}">删除(包括下级及所有功能)</a>
        </td>
    </tr>
        {{foreach from=$datamenu item=li}}
        {{if $li.PARENT_ID==$item.ID}}
        <tr>
            <td>{{$li.ID}}</td>
            <td class="lf">    &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;      {{$li.TITLE}}</td>
            <td>{{if $li.STATE==1}}启用{{else}}禁用{{/if}}</td>
             <td>{{$li.ORDER_NUM}}</td>
            <td><a id="GridView1_ctl02_hlkEdit" href="admin.php?ctl=sysmenu&act=funs&id={{$li.ID}}">功能</a> | 
               <a id="GridView1_ctl02_hlkEdit" href="javascript:edit({{$li.ID}})">修改</a> | <a id="GridView1_ctl02_hlkDel" href="admin.php?ctl=sysmenu&act=del&id={{$li.ID}}">删除</a>
            </td>
        </tr>
        {{/if}}
        {{/foreach}}
    {{/foreach}}
</table>
{{include file="admin/pdown.html"}}